home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / pcl10.zip / PCL.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-28  |  3KB  |  123 lines

  1. unit PCL;
  2.  
  3. interface
  4.  
  5. const
  6.    (* COMM Ports *)
  7.    COM1 = 0;
  8.    COM2 = 1;
  9.    COM3 = 2;
  10.    COM4 = 3;
  11.    (* Baud Rate Codes *)
  12.    Baud300  = 0;
  13.    Baud600  = 1;
  14.    Baud1200 = 2;
  15.    Baud2400 = 3;
  16.    Baud4800 = 4;
  17.    Baud9600 = 5;
  18.    Baud19200  = 6;
  19.    Baud38400  = 7;
  20.    Baud57600  = 8;
  21.    Baud115200 = 9;
  22.    (* Parity Codes *)
  23.    NoParity  = 0;
  24.    OddParity = 1;
  25.    EvenParity= 3;
  26.    (* Stop Bit Codes *)
  27.    OneStopBit  = 0;
  28.    TwoStopBits = 1;
  29.    (* Word Length Codes *)
  30.    WordLength5 = 0;
  31.    WordLength6 = 1;
  32.    WordLength7 = 2;
  33.    WordLength8 = 3;
  34.    (* Buffer Size Codes *)
  35.    Size8    = 0;
  36.    Size16   = 1;
  37.    Size32   = 2;
  38.    Size64   = 3;
  39.    Size128  = 4;
  40.    Size256  = 5;
  41.    Size512  = 6;
  42.    Size1024 = 7;
  43.    Size2048 = 8;
  44.    Size4096 = 9;
  45.    Size8192 =  10;
  46.    Size16384 = 11;
  47.    (* Line Status Masks *)
  48.    TransBufferEmpty = $20;
  49.    BreakDetect  = $10;
  50.    FramingError = $08;
  51.    ParityError  = $04;
  52.    OverrunError = $02;
  53.    DataReady    = $01;
  54.    (* Modem Status Masks *)
  55.    DCD = $80;
  56.    RI  = $40;
  57.    DSR = $20;
  58.    CTS = $10;
  59.    DeltaDCD = $08;
  60.    DeltaRI  = $04;
  61.    DeltaDSR = $02;
  62.    DeltaCTS = $01;
  63.    (* Break Signal Commands *)
  64.    ASSERT = 'A';
  65.    CANCEL = 'C';
  66.    DETECT = 'D';
  67.    (* SioDTR & SioRTS Commands *)
  68.    SETON = 'S';
  69.    CLEAR = 'C';
  70.    READ  = 'R';
  71.  
  72. function SioBaud(Port, BaudCode : Integer) : Integer;
  73. function SioBrkKey : Boolean;
  74. function SioBrkSig(Port : Integer; Cmd : Char) : Integer;
  75. function SioCrtWrite(Ch : Char) : Integer;
  76. function SioDTR(Port : Integer; Cmd : Char) : Integer;
  77. function SioDelay(Tics : Integer) : Integer;
  78. function SioDone(Port : Integer) : Integer;
  79. function SioError(Code : Integer) : Integer;
  80. function SioGetc(Port, Tics : Integer) : Integer;
  81. function SioKeyPress : Boolean;
  82. function SioKeyRead : Char;
  83. function SioLine(Port : Integer) : Integer;
  84. function SioModem(Port : Integer; Mask : Char) : Integer;
  85. function SioParms(Port, ParityCode, StopBitsCode, WordLengthCode : Integer) : Integer;
  86. function SioPutc(Port : Integer; Ch : Char) : Integer;
  87. function SioRTS(Port : Integer; Cmd : Char ) : Integer;
  88. function SioReset(Port, BaudCode : Integer) : Integer;
  89. function SioRxBuf(Port, BufferOfs, BufferSeg, SizeCode : Integer) : Integer;
  90. function SioRxFlush(Port : Integer) : Integer;
  91. function SioRxQue(Port : Integer) : Integer;
  92. function SioTimer : Integer;
  93. function SioUnGetc(Port : Integer; Ch : Char ) : Integer;
  94. function Shareware : Integer;
  95.  
  96. implementation
  97.  
  98. {$L PCL_LIB}
  99.  
  100. function SioBaud ; external;
  101. function SioBrkKey ; external;
  102. function SioBrkSig ; external;
  103. function SioCrtWrite ; external;
  104. function SioDTR ; external;
  105. function SioDelay ; external;
  106. function SioDone ; external;
  107. function SioError ; external;
  108. function SioGetc ; external;
  109. function SioKeyPress ; external;
  110. function SioKeyRead ; external;
  111. function SioLine ; external;
  112. function SioModem ; external;
  113. function SioParms ; external;
  114. function SioPutc ; external;
  115. function SioRTS ; external;
  116. function SioReset ; external;
  117. function SioRxBuf ; external;
  118. function SioRxFlush ; external;
  119. function SioRxQue ; external;
  120. function SioTimer ; external;
  121. function SioUnGetc ; external;
  122. function Shareware ; external;
  123. end.